package cn.tude.cn.tedu.cn.tedu;

import java.util.LinkedList;

public class Test3_LinkedList {
    public static void main(String[] args) {
           LinkedList list=new LinkedList();
           list.add("杨幂");
           list.add("皮皮虾");
           list.add("aaaaa");
        System.out.println(list);
        list.addFirst("钢铁侠");
        list.addLast("灭霸");
        System.out.println(list);
        System.out.println(list.getFirst());
        System.out.println(list.getLast());
        System.out.println(list.removeFirst());
        System.out.println(list.removeLast());
        System.out.println(list);


    }
}
